package com.resource.loginlogoutmanange.config;


import com.resource.loginlogoutmanange.entity.TLoginInformationEntity;

//threadlocal当前类
public class UserHolder {
    private static final ThreadLocal<TLoginInformationEntity> tl = new ThreadLocal<>();
    private static final ThreadLocal<TLoginInformationEntity> ss=new ThreadLocal<>();

    public static void saveUser(TLoginInformationEntity tLoginInformationEntity){
        tl.set(tLoginInformationEntity);
    }

    public static TLoginInformationEntity getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
